#pragma once

#include "exports.hpp"
#include "Plugin.h"
#include "Reply.hpp"

struct CRAWLER_API Filter
{
	enum Result
	{
		Pass,
		Fail
	};
};
///////////////////////////////////////////////////////////////////////////////////////////////////




class CRAWLER_API DataFilter : public Plugin
{
public:

	typedef boost::shared_ptr<DataFilter>         Ptr;
	typedef boost::shared_ptr<const DataFilter>   const_Ptr;

public:

	DataFilter();
	virtual ~DataFilter();



	/**
	 * Test if the given reply can be given to the analyzer or not.
	 *
	 * @param reply    the reply to test
	 *
	 * @return true    when it passed the test
	 * @return false   when it didn't: it will be discarded instead
	 */
	//virtual bool filterReply(const QNetworkReply *reply) const = 0;
	virtual bool filterReply(const Reply& reply) const = 0;
};
///////////////////////////////////////////////////////////////////////////////////////////////////
